<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图片边框</title>
</head>
<style>
    section{
       text-align: center;
    }
    img {
        height: 400px;
        width:300px ;
        margin-top:50px;
        position: relative;
        /*置于底层*/
        z-index: -1;
    }

    div {
        height: 500px;
        width: 400px;
        margin: auto;
        border: 5px solid black;
        box-shadow: inset 0 0 0px 50px blue;
    }

</style>
<body>
<section>
    <div>
        <img src="3.png">
    </div>
    <p>美丽的图片啊</p>
</section>


</body>
</html>